package org.dx.oho.entity;

import java.util.Objects;

/**
 * create by duanx 2020/11/10
 *@description： 产品图片信息
 *@classname: ProductImg
 *@author: duanx
 *@date: 2020/11/10 17:18
 **/
public class ProductImg extends BaseEntity {
    /**
     * 图片ID
     */
    private Long imgId;
    /**
     * 所属产品
     */
    private Product productId;
    /**
     * 图片地址
     */
    private String imgAddr;
    /**
     * 删除状态
     */
    private String delFlag;

    public Long getImgId() {
        return imgId;
    }

    public void setImgId(Long imgId) {
        this.imgId = imgId;
    }

    public Product getProductId() {
        return productId;
    }

    public void setProductId(Product productId) {
        this.productId = productId;
    }

    public String getImgAddr() {
        return imgAddr;
    }

    public void setImgAddr(String imgAddr) {
        this.imgAddr = imgAddr;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ProductImg that = (ProductImg) o;
        return Objects.equals(imgId, that.imgId) &&
                Objects.equals(productId, that.productId) &&
                Objects.equals(imgAddr, that.imgAddr) &&
                Objects.equals(delFlag, that.delFlag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(imgId, productId, imgAddr, delFlag);
    }

    @Override
    public String toString() {
        return "ProductImg{" +
                "imgId=" + imgId +
                ", productId=" + productId +
                ", imgAddr='" + imgAddr + '\'' +
                ", delFlag='" + delFlag + '\'' +
                '}';
    }
}
